package com.hotline.communication.enums;

public enum GetOrSetEnum {

    GET(1,"获取号码"),

    SET(2,"重置号码");

    /**
     * 编码
     */
    private Integer code;

    /**
     * 名称
     */
    private String name;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



    GetOrSetEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static GetOrSetEnum getGenderEnum(Integer code){
        for (GetOrSetEnum getOrSetEnum : GetOrSetEnum.values()){
            if(getOrSetEnum.getCode().equals(code)){
                return getOrSetEnum;
            }
        }
        return null;
    }
}
